const {
    createProxyMiddleware
} = require('http-proxy-middleware');
module.exports = function (app) {
    //数据
    app.use(
        '/api',
        createProxyMiddleware({
            target: 'http://172.17.6.224:8084',
            changeOrigin: true,
            pathRewrite: {
                '^/api': '',
            }
        })
    );
    //图片地址
    app.use(
        '/ap',
        createProxyMiddleware({
            target: 'http://172.17.6.224:8085',
            changeOrigin: true,
            pathRewrite: {
                '^/ap': '',
            }
        })
    );
};